package top.carrotguo.weibo.contract;

import com.sina.weibo.sdk.auth.AccessTokenKeeper;
import com.sina.weibo.sdk.auth.Oauth2AccessToken;

import top.carrotguo.weibo.bean.CommentResultBean;
import top.carrotguo.weibo.retrofit.callback.BaseCallback;
import top.carrotguo.weibo.retrofit.callback.ErrorInfo;
import top.carrotguo.weibo.view.IView;

public interface SendCommentContract {
    interface Model {
        /**
         * 发送评论
         * @param token 该用户的token
         * @param blogId    该条微博的id
         * @param textContent 评论内容
         * @param callback 结果回调
         */
        void sendComment(Oauth2AccessToken token,
                         String blogId,
                         String textContent,
                         final BaseCallback<CommentResultBean,ErrorInfo> callback);
    }

    interface View extends IView {
        /*显示发表中*/
        void showSending();
        /*隐藏发表中*/
        void hideSending();
        /*获取评论内容*/
        String getTextContent();
        /*评论不能为空*/
        void showNoSendEmpty();
        /*评论成功*/
        void showSendSuccess();
        /*评论失败*/
        void showSendError(ErrorInfo errorInfo);
    }

    interface Presenter {
        /*发送评论*/
        void sendComment(Oauth2AccessToken token,String blogId);
    }
}
